void apply_bsp(bsp_node *n,vector& p,float rad,void *data,void (*func)(void
*data,bsp_object *e))
void apply_bsp(bsp_node *n,vector *p,int np,void *data,void (*func)(void *data,bsp_object *e));
Parameter | Type | Description |
---|---|---|
n | bsp_node * | bsp root node |
p | vector& | point |
p | vector * | array of points defining a volume |
np | int | number of points in p array |
rad | float | radius |
data | void * | general pointer data |
func | void (*)(void *data,bsp_object *e) | call-back function |
None
This function is used select objects inside a region. The call-back function will be called for every plug-in object (bsp_object derived) inside the region defined by the parameters. It is used by homing missiles, enemies and any object that needs to look around it. Even the fog maps use this function to easily select the faces it should apply the fog to.
The region can be defiend using a sphere of influence (p and rad) or a set of points (5 an define a frustum, 8 a box, etc...).